package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StoreAccessoriesManagementMapper;
import com.ruoyi.system.domain.StoreAccessoriesManagement;
import com.ruoyi.system.service.IStoreAccessoriesManagementService;

/**
 * 门店配品管理 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-26
 */
@Service
public class StoreAccessoriesManagementServiceImpl implements IStoreAccessoriesManagementService
{
    @Autowired
    private StoreAccessoriesManagementMapper storeAccessoriesManagementMapper;

    /**
     * 查询门店配品管理
     *
     * @param id 门店配品管理主键
     * @return 门店配品管理
     */
    @Override
    public StoreAccessoriesManagement selectStoreAccessoriesManagementById(Long id)
    {
        return storeAccessoriesManagementMapper.selectStoreAccessoriesManagementById(id);
    }

    /**
     * 通过条件查询门店配品管理列表
     *
     * @param accessoryName,barcode 配品名称，配品条码
     * @return 门店配品管理
     */
    @Override
    public List<StoreAccessoriesManagement> selectStoreAccessoriesManagementListByConditions(String accessoryName,String barcode)
    {
        return storeAccessoriesManagementMapper.selectStoreAccessoriesManagementListByConditions(accessoryName,barcode);
    }

    /**
     * 新增门店配品管理
     *
     * @param storeAccessoriesManagement 门店配品管理
     * @return 结果
     */
    @Override
    public int insertStoreAccessoriesManagement(StoreAccessoriesManagement storeAccessoriesManagement)
    {
        return storeAccessoriesManagementMapper.insertStoreAccessoriesManagement(storeAccessoriesManagement);
    }

    /**
     * 修改门店配品管理
     *
     * @param storeAccessoriesManagement 门店配品管理
     * @return 结果
     */
    @Override
    public int updateStoreAccessoriesManagement(StoreAccessoriesManagement storeAccessoriesManagement)
    {
        return storeAccessoriesManagementMapper.updateStoreAccessoriesManagement(storeAccessoriesManagement);
    }

    /**
     * 通过id批量删除门店配品管理信息
     *
     * @param ids 需要删除的门店配品管理主键
     * @return 结果
     */
    @Override
    public int deleteStoreAccessoriesManagementByIds(Long[] ids)
    {
        return storeAccessoriesManagementMapper.deleteStoreAccessoriesManagementByIds(ids);
    }

    /**
     * 通过id删除门店配品管理信息
     *
     * @param id 门店配品管理主键
     * @return 结果
     */
    @Override
    public int deleteStoreAccessoriesManagementById(Long id)
    {
        return storeAccessoriesManagementMapper.deleteStoreAccessoriesManagementById(id);
    }
}
